Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Testing bibtex key patterns and fixing title_case/capitalize modifiers #2663

Closed

Conversation

RolfStarre
Copy link
Contributor

@RolfStarre RolfStarre commented Mar 17, 2017

Related to koppor#237
I'm working on adding tests for key patterns + key patterns in combination with modifiers.

I found out why the title_case and capitalize modifiers didn't work with shorttitle. It went wrong because before the modifier was applied the shorttitle was already a concatenated string, so the formatter would just see it as a single word.
For example if we have the title "An Awesome Paper on JabRef", it would first turn into "AnAwesomePaper", and then the modifier would turn it into "Anawesomepaper".

  • Change in CHANGELOG.md described
  • Tests created for changes
  • Screenshots added (for bigger UI changes)
  • Manually tested changed features in running JabRef
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)
  • If you changed the localization: Did you run gradle localizationUpdate?

@Siedlerchr
Copy link
Member

Just as an idea, maybe you can check if you could include that feature request here?
#457

@RolfStarre
Copy link
Contributor Author

@Siedlerchr I've made a first attempt at adding the feature ^_^

@RolfStarre
Copy link
Contributor Author

RolfStarre commented Mar 20, 2017

I have a problem with testing the regexFormatter, it doesn't take protected parts of a sentence into account.

I don't really know how I can write the code so that it does take the protected characters into account, since it currently only seems to be done on a letter by letter basis.

Any ideas on how this could be done, or shall I just remove the feature here for now?

@Siedlerchr
Copy link
Member

Maybe anyone of the other @JabRef/developers has an idea on how to check that

@koppor
Copy link
Member

koppor commented Apr 24, 2017

@tobiasdiez Maybe you have an idea?

@tobiasdiez
Copy link
Member

Sorry, I've no deep knowledge about regular expressions in particular and about the formatters in general.

@koppor
Copy link
Member

koppor commented May 29, 2017

I understand the question #2663 (comment) as follows:

If I replace regex a by X and I apply it at abc{abc}, the result is Xbc{Xbc}, but it should be Xbc{abc}.

As one cannot change the regex engine, I would {...} replace by something not matched by the regular expression, then apply the regex and then change it back.

  1. Replace protected terms
    1a. Replace first {...}by unicode character 2580
    1b. Replace second {...}by unicode character 2581
    1.c etc.
  2. Apply regex
  3. replace back

@koppor
Copy link
Member

koppor commented Aug 10, 2017

Closing this issue due to inactivity 💤

@shitikanth took over at #3096, because it is unlikely, that we get access to https://github.com/delftswa2017/jabref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants